home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / dicedot.zip / die.inc < prev    next >
Text File  |  1994-08-23  |  3KB  |  101 lines

  1. // die.inc by Andy Wardley <abw@oasis.icl.co.uk>
  2.  
  3.  
  4. #declare dice_texture=
  5. texture { 
  6.     pigment { colour White }
  7.     finish {
  8.         diffuse 0.70
  9.         ambient 0.10
  10.         crand 0.05
  11.     }
  12. }
  13.  
  14. #declare spot_texture=
  15. texture { 
  16.     pigment { Gray05 }
  17.     finish {
  18.         ambient 0.2
  19.         diffuse 0.8
  20.         specular 0.5 
  21.     }
  22. }
  23.  
  24.  
  25. #declare die_body=
  26. union {
  27.     box { <-.50, -.35, -.35> <.50, .35, .35> }
  28.     box { <-.35, -.50, -.35> <.35, .50, .35> }
  29.     box { <-.35, -.35, -.50> <.35, .35, .50> }
  30.     
  31.     cylinder { <-.35,  .35, -.35> < .35,  .35, -.35> .15 } // front top
  32.     cylinder { <-.35, -.35, -.35> < .35, -.35, -.35> .15 } // front bottom    
  33.     cylinder { <-.35,  .35,  .35> < .35,  .35,  .35> .15 } // back top    
  34.     cylinder { <-.35, -.35,  .35> < .35, -.35,  .35> .15 } // back bottom    
  35.     cylinder { <-.35,  .35, -.35> <-.35,  .35,  .35> .15 } // left top    
  36.     cylinder { <-.35, -.35, -.35> <-.35, -.35,  .35> .15 } // left bottom
  37.     cylinder { < .35,  .35, -.35> < .35,  .35,  .35> .15 } // right top    
  38.     cylinder { < .35, -.35, -.35> < .35, -.35,  .35> .15 } // right bottom
  39.     cylinder { <-.35, -.35, -.35> <-.35,  .35, -.35> .15 } // left front
  40.     cylinder { <-.35, -.35,  .35> <-.35,  .35,  .35> .15 } // left back
  41.     cylinder { < .35, -.35, -.35> < .35,  .35, -.35> .15 } // right front
  42.     cylinder { < .35, -.35,  .35> < .35,  .35,  .35> .15 } // right back
  43.         
  44.     sphere { <-.35,  .35, -.35> .15 }
  45.     sphere { < .35,  .35, -.35> .15 }
  46.     sphere { < .35, -.35, -.35> .15 }
  47.     sphere { <-.35, -.35, -.35> .15 }
  48.     sphere { <-.35,  .35,  .35> .15 }
  49.     sphere { < .35,  .35,  .35> .15 }
  50.     sphere { < .35, -.35,  .35> .15 }
  51.     sphere { <-.35, -.35,  .35> .15 }
  52.  
  53.     texture { dice_texture }
  54. }
  55.  
  56.  
  57. #declare die_spots=
  58. union {
  59.     sphere { <    0,     0, -.612> .14 }
  60.  
  61.     sphere { < -.22,  .612,   .22> .14 }
  62.     sphere { <  .22,  .612,  -.22> .14 }
  63.  
  64.     sphere { <-.612,   .22,   .22> .14 }    
  65.     sphere { <-.612,     0,     0> .14 }
  66.     sphere { <-.612,  -.22,  -.22> .14 }
  67.  
  68.     sphere { < .612,   .22,   .22> .14 }
  69.     sphere { < .612,   .22,  -.22> .14 }
  70.     sphere { < .612,  -.22,  -.22> .14 }
  71.     sphere { < .612,  -.22,   .22> .14 }
  72.  
  73.     sphere { < -.22, -.612,   .22> .14 }
  74.     sphere { < -.22, -.612,  -.22> .14 }
  75.     sphere { <    0, -.612,     0> .14 }
  76.     sphere { <  .22, -.612,  -.22> .14 }
  77.     sphere { <  .22, -.612,   .22> .14 }
  78.  
  79.     sphere { < -.22,  -.22,  .612> .14 }
  80.     sphere { <    0,  -.22,  .612> .14 }
  81.     sphere { <  .22,  -.22,  .612> .14 }
  82.     sphere { < -.22,   .22,  .612> .14 }
  83.     sphere { <   .0,   .22,  .612> .14 }
  84.     sphere { <  .22,   .22,  .612> .14 } 
  85.  
  86.     texture { spot_texture }
  87. }
  88.  
  89.  
  90. #declare die=
  91. difference {
  92.     object { die_body }
  93.     object { die_spots }
  94.         
  95.     bounded_by { box { <-0.5, -0.5, -0.5> <0.5, 0.5, 0.5> } }
  96. }    
  97.         
  98.  
  99.  
  100.  
  101.